package model

import "time"

type User struct {
	ID     int
	Pwd    string `gorm:"type:varchar(15)"`
	Phone  string `gorm:"type:varchar(15)"`
	Type   int    //用户类型，1为管理员，0为普通用户
	Points int
}

type History struct {
	ID        int
	UID       int       `gorm:"column:uid"` //userId
	CID       int       `gorm:"column:cid"` //ClassId
	StartTime time.Time `gorm:"type:timestamp"`
	EndTime   time.Time `gorm:"type:timestamp"`
	//Point     int       //分数变化情况
	//Type      int       //分数变化方式，0为扣分，1为加分
	//Tid       int       `gorm:"column:tid"` //时间的Id
}

type Class struct {
	ID      int
	Address string `gorm:"type:varchar(255)"`
	UID     int    `gorm:"column:uid"` //管理员Id
	Length  int    //一行有多少个座位
}

type Seat struct {
	ID     int
	CID    int `gorm:"column:cid"` //classId
	SortID int
}

type Time struct {
	ID        int
	SID       int       `gorm:"column:sid"` //seatId
	UID       int       `gorm:"column:uid"` //userId
	StartTime time.Time `gorm:"type:timestamp"`
	EndTime   time.Time `gorm:"type:timestamp"`
}

type FeedBack struct {
	ID      int
	Content string `gorm:"type:text"`
}
